<?php 

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Education
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */

return array(

  // ------- on user profile tab

  array(
    'title' => 'Profile Educations',
    'description' => 'Displays a member\'s educations on their profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-educations',
    'defaultParams' => array(
      'title' => 'Educations',
      'titleCount' => true,
      'max' => 5,
      'year' => 'year',
      'showphoto' => 1,
      'showdetails' => 1,
      'showmeta' => 1,
      'showdescription' => 0,
    ),
    'adminForm' => array(
      'elements' => array(
        array(
          'Text',
          'title',
          array(
            'label' => 'Title',
            'value' => 'Educations',
          )
        ),
        array(
          'Text',
          'max',
          array(
            'label' => 'Max Educations',
            'value' => 5,
          ),
        ),
        array(
          'Select', 
          'order',
          array(
            'label' => 'Sort By',
            'multiOptions' => array(
              'recent' => 'Most Recent',
              'lastupdate' => 'Last Updated',
              'alphabet' => 'School Name',
              'year' => 'Class Year',
              'mostviewed' => 'Most Viewed',
              'mostcommented' => 'Most Commented',
              'mostliked' => 'Most Liked',
            ),
            'value' => 'year',
          )
        ),
        array(
          'Select', 
          'showphoto',
          array(
            'label' => 'Show Photo',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 1,
          )
        ),  
        array(
          'Select', 
          'showdetails',
          array(
            'label' => 'Show Details',
            'description' => 'Ex: school type, major, minor etc..',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 1,
          )
        ), 
        array(
          'Select', 
          'showmeta',
          array(
            'label' => 'Show Meta',
            'description' => 'Ex: date added, view/comment count etc..',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ), 
        array(
          'Select', 
          'showdescription',
          array(
            'label' => 'Show Description',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ),                
      ),
    ),     
  ),
  
  // ------- categories
  
  array(
    'title' => 'Education Categories',
    'description' => 'Displays a list of education categories.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.categories',
    'defaultParams' => array(
      'title' => '',
      'showdetails' => 0,
      'showphoto' => 1,
      'descriptionlength' => 68,
    ),   
    'adminForm' => array(
      'elements' => array(
        array(
          'Text',
          'title',
          array(
            'label' => 'Title',
          )
        ),
        array(
          'Select',
          'showdetails',
          array(
            'label' => 'Show Details',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ),
        array(
          'Select',
          'showphoto',
          array(
            'label' => 'Show Photo',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 1,
          )
        ),
        array(
          'Text',
          'descriptionlength',
          array(
            'label' => 'Max Description Characters',
            'value' => 68,
          ),
        ),
      ),
    ),    
  ), 
  
    
  // ------- list educations
  
  array(
    'title' => 'List Educations',
    'description' => 'Displays a list of posted educations with different filtering options (can be used to build variety of education listings such as Recent Educations, Most Commented by XYZ user with specified category etc..)',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.list-educations',
    'defaultParams' => array(
      'title' => 'Recent Educations',
      'max' => 10,
      'order' => 'recent',
      'display_style' => 'wide',
      'showphoto' => 1,
      'showdetails' => 1,
      'showmeta' => 0,
      'showdescription' => 1,
      'period' => 0,
      'featured' => 0,
    ),  
    'adminForm' => array(
      'elements' => array(
        array(
          'Text',
          'title',
          array(
            'label' => 'Title',
            'value' => 'Recent Educations',
          )
        ),
        array(
          'Text',
          'max',
          array(
            'label' => 'Max Educations',
            'value' => 10,
          ),
        ),
        array(
          'Text',
          'user',
          array(
            'label' => 'User',
          ),
        ),
        array(
          'Select',
          'category',
          array(
            'label' => 'Category',
            'multiOptions' => array(""=>"") + Engine_Api::_()->education()->convertCategoriesToArray(Engine_Api::_()->education()->getCategories()),
          )
        ), 
        array(
          'Select', 
          'order',
          array(
            'label' => 'Sort By',
            'multiOptions' => array(
              'recent' => 'Most Recent',
              'lastupdate' => 'Last Updated',
              'alphabet' => 'School Name',
              'year' => 'Class Year',
              'mostviewed' => 'Most Viewed',
              'mostcommented' => 'Most Commented',
              'mostliked' => 'Most Liked',
            ),
            'value' => 'recent',
          )
        ),
        array(
          'Radio',
          'display_style',
          array(
            'label' => 'Display Style',
            'multiOptions' => array(
              'wide' => "Wide (main middle column)",
              'narrow' => "Narrow (left / side side column)",
            ),
            'value' => 'wide',
          )
        ),
        array(
          'Select', 
          'showphoto',
          array(
            'label' => 'Show Photo',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 1,
          )
        ),  
        array(
          'Select', 
          'showdetails',
          array(
            'label' => 'Show Details',
            'description' => 'Ex: school type, major, minor etc..',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 1,
          )
        ), 
        array(
          'Select', 
          'showmeta',
          array(
            'label' => 'Show Meta',
            'description' => 'Ex: date added, view/comment count etc..',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ), 
        array(
          'Select', 
          'showdescription',
          array(
            'label' => 'Show Description',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ), 
        array(
          'Select',
          'period',
          array(
            'label' => 'Period',
            'multiOptions' => array(
              0 => "All Time",
              7 => "This Week",
              30 => "This Month",
              90 => "3 Months",
              180 => "6 Months",
              365 => "This Year",
            ),
            'value' => 0,
          )
        ),
        array(
          'Select', 
          'featured',
          array(
            'label' => 'Show only featured educations?',
            'multiOptions' => array(
              1 => 'Yes',
              0 => 'No'
            ),
            'value' => 0,
          )
        ),                              
      ),
    ),    
  ),  

  // ------- top menu nav
  array(
    'title' => 'Menu Educations',
    'description' => 'Displays a menu navigation (Browse Education, My Educations, Add New Education) on education home page.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.main-menu',
  ), 
  
  // ------- create new link
  array(
    'title' => 'Post New Education',
    'description' => 'Displays a quick navigation link to post new education',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.create-new',
  ),   
  
  // ------- search form
  
  array(
    'title' => 'Search Educations',
    'description' => 'Displays search form on education home page.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.search-form',
  ), 

  // ------- popular tags
  
  array(
    'title' => 'Education Popular Tags',
    'description' => 'Displays education popular tags.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.popular-tags',
    'defaultParams' => array(
      'title' => 'Popular Tags',
      'max' => 50,
      'order' => 'text',
    ),
    'adminForm' => array(
      'elements' => array(
        array(
          'Text',
          'title',
          array(
            'label' => 'Title',
            'value' => 'Popular Tags',
          )
        ),
        array(
          'Text',
          'max',
          array(
            'label' => 'Max Educations',
            'value' => 50,
          ),
        ),
        array(
          'Select',
          'order',
          array(
            'label' => 'Order By',
            'multiOptions' => array(
              'text' => 'Tag Name',
              'total' => 'Total Count'
            ),
            'value' => 'text',
          )
        ),                
      ),
    ),     
  ),

  // ------- featured education
  array(
    'title' => 'Featured Educations',
    'description' => 'Displays a randomized featured educations.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.featured-education',    
    'defaultParams' => array(
      'title' => 'Featured Educations',
    ),  
  ),
  
  
  // ========================= EDUCATION PROFILE WIDGETS (education view page) ===========================

  
  // ------- education profile comments
  array(
    'title' => 'Education Profile - Comments',
    'description' => 'Displays a education\'s comments on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-comments',       
  ),
  

  
  // ------- education profile options
  array(
    'title' => 'Education Profile - Options',
    'description' => 'Displays a education\'s options (View Submitter Educations | Edit | Delete) on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-options',       
  ),

  // ------- education profile options
  array(
    'title' => 'Education Profile - Photo',
    'description' => 'Displays a education\'s main photo.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-photo',       
  ),  

  // ------- education profile social shares
  array(
    'title' => 'Education Profile - Social Shares',
    'description' => 'Displays a education\'s social shares such as Facebook, Twitter, Digg using AddThis service on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-social-shares',       
  ),
  
  // ------- education profile stats
  array(
    'title' => 'Education Profile - Stats',
    'description' => 'Displays a education\'s stats (owner, date posted, date updated, various of view, comment, like counts) on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-stats',    
    'defaultParams' => array(
      'title' => 'Statistics',
    ),     
  ),
  
  // ------- education profile submitter
  array(
    'title' => 'Education Profile - Submitter',
    'description' => 'Displays a education\'s submitter on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-submitter',       
  ),

  // ------- education profile tools
  array(
    'title' => 'Education Profile - Tools',
    'description' => 'Displays a education\'s tools (Share | Report) on its profile.',
    'category' => 'Educations',
    'type' => 'widget',
    'name' => 'education.profile-tools',       
  ),  
  
  
);

